package com.gitee.kamismile.disruptorEx.commandhandling.messaging;

import com.gitee.kamismile.disruptorEx.commandhandling.CommandMessage;
import com.gitee.kamismile.disruptorEx.commandhandling.Message;

public class GenericMessage<T> implements Message<T> {
    private final CommandMessage payload;

    public GenericMessage(CommandMessage payload) {
        this.payload = payload;
    }

    public CommandMessage getCommandMessage() {
        return this.payload;
    }


    @Override
    public T getPayload() {
        return (T) payload.doCmd();
    }
}
